/**
 * @(#)com.pattern.p_02_observer.oo.InternetTest
 *
 * Copyright (c) 2014-2018 上海纬视瑞科技有限公司
 *
 * DESC:
 *
 */
package com.pattern.p_02_observer.weather;

/**
 * @author fusf
 * @version 1.0  2016/11/3
 */
public class InternetTest {

    public static void main(String[] args) {
        CurrentConditions currentConditions = new CurrentConditions();
        ForeConditions foreConditions = new ForeConditions();

        WeatherSubject weatherSubject = new WeatherSubject();
        weatherSubject.registerObserver(currentConditions);
        weatherSubject.registerObserver(foreConditions);
        weatherSubject.sendData(16, 12, 13);

        weatherSubject.removeObserver(currentConditions);
        weatherSubject.sendData(12,23,34);
    }
}
